const express = require("express");
const {
  getStore,
  addStore,
  delStore,
  editStore,
  getDocs,
  addDocs,
  delDocs,
  editDocs,
} = require("../controller/docsController");
const { verifyToken } = require("../utils/jwt");
const { storeValidator } = require("../middleware/docsValidator");

const router = express.Router();

router.get("/getStore", verifyToken, getStore);
router.post("/addStore", verifyToken, storeValidator, addStore);
router.post("/editStore", verifyToken, editStore);
router.delete("/delStore", verifyToken, delStore);

router.get("/getDocs", getDocs);
router.post("/addDocs", addDocs);
router.delete("/delDocs", delDocs);
router.post("/editDocs", editDocs);

module.exports = router;
